1. Field of the Invention
The present invention relates to a numerical controller (CNC) configured to communicate with a plurality of external signal input/output units (I/O units) that are connected so as to perform input and output of DI/DO signals (input/output signals) between the numerical controller and a machine tool.
2. Description of the Related Art
To perform input and output of DI/DO signals between a numerical controller (CNC) and a machine tool, a plurality of external signal input/output (I/O) units for use as slaves are connected to the numerical controller (see FIG. 1). In this case, the numerical controller serves as a master, and the I/O units serves as slaves. Normally, DI/DO signals are transferred between the numerical controller and the I/O units. Since the numerical controller is expected to perform predetermined processing within a predetermined time, the transfer period of these DI/DO signals should preferably be fixed. In many cases, therefore, signals are transferred to all the I/O units in a fixed-period, time-sharing manner (see FIG. 2).
Japanese Patent Application Laid-Open No. 2005-25545 discloses a technique in which a master and a plurality of I/O units are connected by one or more communication lines.
Further, as shown in FIG. 3, Japanese Patent Application Laid-Open No. 2004-289754 discloses a method of constructing a data frame for serial communication, in which a single master 11, a group A 12 of slaves that requires an early data updating and a group B 13 of slaves that allows a late data updating are connected on the same communication loop for cyclic data transfer. The period of serial communication is adjusted to a data updating rate necessary for the slave group A 12, and data updating of the slave group B 13 is performed in a period equal to an integral multiple of the period of serial communication. Further, as shown in FIG. 4 and FIG. 5, a single data field 32 is formed by coupling command data transmitted from the master to parts of the slave group A 12 and the slave group B 13 within a single period. Also, a single data field is formed by coupling response data returned to the master. A header field 31 which represents address of each of the slaves concerned in bits is added to the head of the data field 32, and the data 21 to 24 of slaves indicated by this address area are coupled in a predetermined order. Thus, the slave data included in the data field can be extracted by using only configuration of the address area having a bit length of header field 31.
In the case where signals are transferred in a fixed-period, time-sharing manner by one-on-one communication between a master and slaves that are chain-connected (master-slave communication), the transfer period and the number of signals are in a trade-off relationship. Specifically, transfer period has to be extended in order to increase the number of signals beyond the transfer capability, as a result, the responsiveness is inevitably reduced. If the transfer period is shortened for the preference of the signal response, in contrast, the number of signals is inevitably reduced (see FIG. 2) (see above-mentioned Japanese Patent Application Laid-Open No. 2005-25545, see FIG. 2).
A technique for solving the above-mentioned problem of Japanese Patent Application Laid-Open No. 2005-25545 is disclosed in Japanese Patent Application Laid-Open No. 2004-289754. Since the technique disclosed in Japanese Patent Application Laid-Open No. 2004-289754 relates how to solve problems of broadcast communication (broadcast transmission) based on the loop-coupling method, however, it cannot be directly applied to one-on-one communication between a master and slaves (master-slave communication) based on chain-connection. In the master-slave communication, in particular, slaves located farther from the master generally require longer reply times (see FIG. 6). Therefore, there is a problem that more frequent communication with slaves farther from the master results in longer waiting times for replies and waste of a bandwidth. The technique disclosed in Japanese Patent Application Laid-Open No. 2004-289754 cannot solve this problem (see FIG. 7).